// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

import router from "./router";
import store from "./store";

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import Animate from 'animate.css'

import { mavonEditor } from 'mavon-editor'
//import 'mavon-editor/dist/css/index.css'


Vue.use(ElementUI);
Vue.use(Animate);
//Vue.use(mavonEditor);


Vue.config.productionTip = false;

// 设置页面跳转后，自动显示信也面顶部
router.beforeEach((to, from, next) => {
  // chrome兼容
  document.body.scrollTop = 0
  // firefox兼容
  document.documentElement.scrollTop = 0
  // safari兼容
  window.pageYOffset = 0
  next()
})


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
